import 'package:elevator/mqtt/mqtt_manager.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'testing_logic.dart';

class TestingPage extends StatelessWidget {
  final logic = Get.put(TestingLogic());

  @override
  Widget build(BuildContext context) {
    return Obx(() {
      return Scaffold(
        appBar: AppBar(title: const Text('返回'),),
        body: Center(
          child: SingleChildScrollView(
            scrollDirection: Axis.vertical,
            child: Column(
              children: [
                Text('${logic.name}'),
                ElevatedButton(onPressed: () => logic.test(),
                    child: const Text('点击我更改名字吧'))
              ],
            )
          ),
        ),
      );
    });
  }
}
